console.log 'this is come from head.coffee'

isValid = false

# functions:
square = (x) -> x*x
cube = (x) -> square(x)*x

math = 
	root:	Math.sqrt
	square:	square
	cube:	cube
	
list = [1, 2, 3]

cubes = (math.cube num for num in list)
cubes2 = (math.cube num for num in list when num isnt 2)
	
fill = (container, liquid="coffee") ->
	"Filling the #{container} with #{liquid}.."

eldest = if 24>21 then "Lia" else "li"
	
init = ->
	console.log 'init' if elvis?
	console.log fill("div")
	console.log cubes
	console.log cubes2
	console.log eldest
	isValid

$ ->
	init()
	$(".account").attr class: 'active'
	$(".account").attr 'width', '100'
	
Account = (customer, cart) ->
	@customer = customer
	@cart = cart
	
	$(".shopping_cart").bind 'click', (event) =>
		$customer.purchase @cart